package com.lnu.information.thread;

/**
 * @author : jian.zhang-2
 * @description:
 * @date : Create in 12:10 PM 2022/5/12
 * @modified By :
 */
public class App13_01 {
    public static void main(String[] args) {
        Ctest  dog = new Ctest("doggy");
        Ctest  cat = new Ctest("kitty");
        try {
            dog.join();
        }catch (InterruptedException e){
            e.printStackTrace();
        }

        cat.start();
    }
}



class Ctest extends Thread{
    private String id;

    public Ctest(String id) {
        this.id = id;
    }
    public void run(){
        for (int j = 0; j < 10000000; j++){
            System.out.println(id + " is running...");
        }
    }
}
